<template>
	<div>
		<div class="title">
			<h4>{{info.title}}</h4>
			<p>{{info.add_time | datafmat('YYYY-MM-DD')}} {{info.click}}次浏览</p>
		</div>
		<div class="content" v-html="info.content">
			
		</div>
		<comments :id="id"></comments>
	</div>
</template>

<script>
	import comments from '../comments/comment.vue'
	export default{
		components:{
			'comments':comments
		},
		data(){
			return {
				id: 0,
				info:{}
			}
		},
		created(){
			this.id=this.$route.params.id;
			this.getinfo()
		},
		methods:{
				getinfo(){
				this.$http.get('http://www.lovegf.cn:8899/api/getimageInfo/'+this.id).then(function(response){
						if(response.body.status !=0 ){
							this.$toast(response.body.message);
							return
						}
						this.info=response.body.message[0]
//						console.log(this.info)
				})
			}
		}
	}
</script>

<style scoped>
	
</style>